package simulation;

import storage.beans.Region;
import common.ICell;
import common.IGrid;

public class EarthClone implements IGrid {
  private ICell[][] grid;
  private int gridWidth;
  private int gridHeight;
  private long currentTime;
  private int gridSpacing;
  
  public EarthClone(ICell[][] grid, int gridWidth, int gridHeight, long currentTime, int gridSpacing) {
    this.grid = grid;
    this.gridWidth = gridWidth;
    this.gridHeight = gridHeight;
    this.currentTime = currentTime;
    this.gridSpacing = gridSpacing;
  }
  
  public float getCellHeight(int x, int y) {
    return grid[y][x].getCellHeight();    
  }
  
  public int getWidth() {
    return gridWidth;
  }
  
  public int getHeight() {
    return gridHeight;
  }
  
  public Region getRegion(int x, int y) {
    return grid[y][x].getRegion();
  }
  
  public IGrid copy() {
    return new EarthClone(grid, gridWidth, gridHeight, currentTime, gridSpacing);
  }
  
  public int getGridSpacing() {
    return gridSpacing;
  }
  
  public long getTime() {
    return currentTime;
  }
  
  public double getTemperature(int x, int y) {
    return this.grid[y][x].getTemperature();
  }
  

}
